3 Points Make a Circle

One of the common problems that arises in recreational math is to find the circle which is described by three random points which are not on the same line. Clearly, the three points have to be distinct, since two points can form infinitely many circles. The rectangular coordinate equation of a circle is $$(x-h)^{2}+(y-k)^{2}=r^{2} \tag{1} \label{1}$$ where $(h,k)$ represent the center, $r$ is the radius and $(x,y)$ are the points on the circle. A simple brute force method to solving the problem is to write three equations for the three given points and solve for $h$, $k$, and $r$. Using a CAS (computer algebra machine) code to do this is given in Listing 1.

Listing 1: Code for Python 2 in SAGE.

var('r h k')
x1=1;y1=1     #1st point on circle
x2=3;y2=-7     #2nd point on circle
x3=12;y3=1     #3rd point on circle
EQ1=(x1-h)^2+(y1-k)^2==r^2     #1st Equation of circle
EQ2=(x2-h)^2+(y2-k)^2==r^2     #2nd Equation of circle
EQ3=(x3-h)^2+(y3-k)^2==r^2     #3rd Equation of circle
pc=solve([EQ1,EQ2,EQ3],h,k,r,solution_dict=True)     #Ask SAGE to solve equations
r= pc[1][r].n(30)     #save answers from SAGE
h=pc[0][h].n(30)     #save answers from SAGE
k=pc[0][k].n(30;) print r,h,k     #ask SAGE to print answers
RESULT: h=6.5; k=-1.875; r=6.2061    #Center point and radius returned by SAGE

Find a circle from 3 points: Code to let SAGE find the circle made from 3 points. There is no math here, just some technical knowledge about how to use an algebra machine. Notice for instance, the line that begins as "pc=solve".

There is another way. If the simultaneous solution above is replaced with some clever substitutions, it is fairly easy to get the solution by hand.

Let the three points be $(x_{1},\,y_{1})\quad(x_{2},\,y_{2})\quad(x_{3},\,y_{3})$ then define $n_1, n_2$ and $p_1, p_2$. Then use these to calculate $h,k$ and $r$. $$n_{1}=\frac{y_{1}-y_{2}}{x_{1}-x_{2}}\qquad n_{2}=\frac{y_{1}-y_{3}}{x_{1}-x_{3}}$$ $$p_{1}=\frac{x_{1}+x_{3}}{2}+n_{1}\left(\frac{y_{1}+y_{2}}{2}\right)\qquad p_{2}=\frac{x_{1}+x_{3}}{2}+n_{2}\left(\frac{y_{1}+y_{3}}{2}\right)$$ $$k=\frac{p_{2}-p_{1}}{n_{2}-n_{1}}$$ $$h=p_{2}-n_{2}k$$ $$r=\sqrt{(x_{1}-h)^{2}+(y_{1}-k)^{2}}$$

Pts3Circle.png
Figure 1: Calculate the center $(h,k)$ and the radius $r$ from just the coordinates of $3$ points in order to write a circle graph as $(x-h)^{2}+(y-k)^{2}=r^{2.}$ An applet is at https://www.geogebra.org/m/wgfjq8d2

3 Points Make a Circle - Method 2

The following method is useful in two dimensions as presented here, but it is probably the easiest way to find the circle when the points are in 3-space. The 3-space method is presented later in a chapter about vectors as it has a few more twists to get the circle equation.

If we draw any triangle, and then construct perpendicular lines at the mid-point of each side, the three lines will meet at a single point. This phenomenon is known as “concurrency”. As it turns out, the concurrent point represents the center of a circle that passes through each of the three triangle vertices and has radius of distance $\Vert(center-vertex)\Vert$. Thus having quickly identified both the circles center, $C$ and radius,$r$, its equations is $(x-C_x)^2 + (y-C_y)^2=r^2.$

Example: Given points $P(1,1)$, $Q(4,5)$ and $R(5,1)$, write an equation for the circle that passes through all three points.
Circumscribe_2d.png
Figure 2: Circumscribe a Circle around triangle $PQR$ to find the equation of a circle through three given points. The detail is given in the example. The figure shows the $3$ points, $P$, $Q$, $R$, graphed on a plane. Label the midpoint of any two of the triangle sides. In the figure, these are $P^{\prime}$ and $Q^{\prime}$. Construct perpendicular lines from these midpoints. Where they intersect will be the center point of the desired circle. The radius of the circle will be the distance from the center point to any one of the given points. The circle equation is then $(x-c_p(x))^{2}+(y-c_p(y))^{2}=radi^{2}$

Answer: The line from $P$ to $Q$ has midpoint $P'=(Q+P)/2=(2.5,3)$. The direction vector $(Q-P)=\binom{3}{4}$, which means the slope is $\frac{4}{3}$ and the perpendicular slope $(-1/m)$ is $\frac{-3}{4}$. Using the point $P'$, we can solve for the perpendicular line to get $y=-\frac{3}{4}x+4.875$.

The line from $R$ to $Q$ has midpoint $Q'=(R+Q)/2=(4.5,3)$. The direction vector $(Q-R)=\binom{-1}{4}$, which means the slope is $-4$ and the perpendicular slope $(-1/m)$ is $\frac{1}{4}$. Using the point $Q'$ , we can solve for the perpendicular line to get $y=\frac{1}{4}x+1.875$.

Now we can solve for the intersection of the two lines: $y=-\frac{3}{4}x+4.875$ and $y=\frac{1}{4}x+1.875$, which will give $\binom{x}{y}=\binom{3}{2.625}$, which is the center point for a circle that will pass through the 3 points. The radius is given by $$\left\Vert\binom{3}{2.625}-\binom{1}{1}\right\Vert=$$ $$\sqrt{(3-1)^2+(2.625-1)^2}=2.57694.$$

Now we can write the circle equation: $(x-3)^{2}+(y-2.625)^{2}=2.57694^{2}$.